package com.guigu.tms.manager.controller.wj;

import com.github.pagehelper.PageInfo;
import com.guigu.tms.commons.entity.base.PdTransportLineType;
import com.guigu.tms.manager.feign.wj.TransportLineTypeFeignClient;
import com.guigu.tms.manager.feign.wj.TransportTripsFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("/pdTransportLineType")
public class TransportLineTypeController {

    @Autowired
    TransportLineTypeFeignClient transportLineTypeFeignClient;

    @PostMapping("/findTransportLineType")
    public PageInfo<PdTransportLineType> findTransportLineType(@RequestBody Map<String, String> map){
        return transportLineTypeFeignClient.findTransportLineType(map);
    }

    @PostMapping("/AddTransportLineType")
    public int AddTransportLineType(@RequestBody PdTransportLineType pdTransportLineType){
        return transportLineTypeFeignClient.AddTransportLineType(pdTransportLineType);
    }

    @PutMapping("/UpdateTransportLineType")
    public int UpdateTransportLineType(@RequestBody PdTransportLineType pdTransportLineType) {
        return transportLineTypeFeignClient.UpdateTransportLineType(pdTransportLineType);
    }

    @DeleteMapping("/DeleteTransportLineTypeByid")
    public int DeleteTransportLineTypeByid(@RequestParam String id){
        return transportLineTypeFeignClient.DeleteTransportLineTypeByid(id);
    }
}
